Skip to content

refactor (pool 2/N): Pipeline owns its PSInvocationState#26

Merged
irvingouj@Devolutions (irvingoujAtDevolution) merged 2 commits into
masterfrom
stack/07-pipeline-owns-state
Jun 23, 2026
Merged

refactor (pool 2/N): Pipeline owns its PSInvocationState#26
irvingouj@Devolutions (irvingoujAtDevolution) merged 2 commits into
masterfrom
stack/07-pipeline-owns-state

Conversation

@irvingoujAtDevolution

Copy link
Copy Markdown
Collaborator

Stacked on #25. Second step of decomposing the RunspacePool god-object.

Pipeline now owns its PSInvocationState instead of the pool poking the field:

  • state field made private; added state() / set_state() / is_terminal().
  • pool.rs routes all reads/writes/terminal-checks through them (the Stopped||Completed||Failed disjunction collapses to is_terminal() at the same point).
  • Behavior-preserving; no wire/logic change. clippy clean, tests green.

Reviewed: Benoit-style pass (no actionable findings) + Codex pass (NO_ISSUES_FOUND).

Pure, behavior-preserving move of the SecureString in-place encryption walk,
the AES-256-CBC helper, and KeyExchangeState out of the ~1900-line pool.rs into
a dedicated runspace_pool/crypto.rs module (private, items pub(super)). First
step of decomposing the RunspacePool god-object; no logic or wire-format change.
Make the `state` field private and route all transitions through
`set_state()` / reads through `state()` / terminal checks through
`is_terminal()`, instead of the RunspacePool poking the field directly.
Behavior-preserving; no wire/logic change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant